@<template>
  <el-table :data="userData" border style="width: 100%">
    <el-table-column type="index"></el-table-column>
    <el-table-column prop="username" label="姓名"> </el-table-column>
    <el-table-column prop="role_name" label="等级"> </el-table-column>
    <el-table-column prop="mobile" label="电话"> </el-table-column>
    <el-table-column prop="mobile" label="会员账号"> </el-table-column>
    <el-table-column  label="状态"> 
      <template slot-scope="scope">
        <el-switch v-model="scope.row.mg_state"></el-switch>
      </template>
    </el-table-column>
    <el-table-column  label="操作" width="180px">
      <template >
        <el-button type="primary" icon="el-icon-edit" size="mini"></el-button>
        <el-button type="danger" icon="el-icon-delete" size="mini"></el-button>
        <el-tooltip class="item" effect="dark" content="设置" placement="top" :enterable="false">
          <el-button type="warning" icon="el-icon-setting" size="mini"></el-button>
        </el-tooltip>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  data() {
    return {
      userData: {},
    };
  },
  created(){
    this.userData = this.$store.getters.getUserPageData.users
  },
  filters: {
    isUse(result) {
      return result ? "正常" : "停用"
    }
  }
};
</script>

<style lang="less" scoped>
.el-table {
  margin-top: 15px;
  font-size: 12px;
}
</style>
